package com.lagou.concurrent.demo;

public class UserThread extends Thread {
    private Integer index = 0;

    private User user;

    public UserThread(User user) {
        this.user = user;
    }

    @Override
    public void run() {
        while (true) {

            if (index >= 100) {
                System.exit(0);
            }

            System.out.println(Thread.currentThread().getName() + " ===> " + user);
            index++;
        }
    }
}
